export const useField = {
    // 返回指定字段的对象
    include:(obj:any,field:any[])=>{
        let newObj:any = {}
        for (let key in obj){
            if(field.includes(key)){
                newObj[key] = cloneDeep(obj[key])
            }
        }
        return newObj
    },
    // 排除指定字段的对象
    exclude:(obj:any,field:any[])=>{
        let newObj = cloneDeep(obj)
        for (let key in newObj){
            if(field.includes(key)){
                delete newObj[key]
            }
        }
        return newObj
    }
} 